import axios from "../utils/axios";

// 突破10分位点数据
export function getMonthLpUp() {
    return axios.get('/statistic/monthLpUp')
}

// 突破的详细数据
export function getMonthLuUpDetail(month) {
    if (month) {
        return axios.get('/statistic/monthLpUpDetail?month=' + month)
    }
    return axios.get('/statistic/monthLpUpDetail')
}

export function getMonthLpNewHighDetail(month) {
    if (month) {
        return axios.get('/statistic/monthLpNewHigh?month=' + month)
    }
    return axios.get('/statistic/monthLpNewHigh')
}


export function getWeekLpUpDetail(week) {
    if (week) {
        return axios.get('/statistic/weekLpUpDetail?week=' + week)
    }
    return axios.get('/statistic/weekLpUpDetail')
}

export function getWeekLpNewHighDetail(week) {
    if (week) {
        return axios.get('/statistic/weekLpNewHighDetail?week=' + week)
    }
    return axios.get('/statistic/weekLpNewHighDetail')
}

// 跌破的详细数据
export function getMonthLuDownDetail(month) {
    if (month) {
        return axios.get('/statistic/monthLpDownDetail?month=' + month)
    }
    return axios.get('/statistic/monthLpDownDetail')
}


// 跌破10分位点数据
export function getMonthLpDown() {
    return axios.get('/statistic/monthLpDown')
}

export function getYearLineDownDetail(week) {
    if (week) {
        return axios.get('/statistic/yearLineDownDetail?week=' + week)
    }
    return axios.get('/statistic/yearLineDownDetail')
}


export function getYearLineUpDetail(week) {
    if (week) {
        return axios.get('/statistic/yearLineUpDetail?week=' + week)
    }
    return axios.get('/statistic/yearLineUpDetail')
}

//  年涨跌统计
export function getYearPctStat(stock) {
    if (stock) {
        return axios.get('/statistic/yearPctStat/' + stock)
    } else {
        return axios.get('/statistic/yearPctStat')
    }
}

// 突破300日线数据
export function getYearLineUp(date) {
    if (date) {
        return axios.get('/statistic/yearLineUp?date=' + date)
    }
    return axios.get('/statistic/yearLineUp')
}

// 跌破300日线数据
export function getYearLineDown(date) {
    if (date) {
        return axios.get('/statistic/yearLineDown?date=' + date)
    }
    return axios.get('/statistic/yearLineDown')
}